﻿@model KRM.Core.tblKRMTradeCustomer
<div>
    <form id="frOrderHistory">
        <input type="hidden" name="tradeAccNumber" value="@Model.TradeAccNumber"/>
        <input type="hidden" name="storeId" value="@Model.StoreId"/>
        <div class="row-fluid">
            <div class="span1">Search:</div>
            <div class="span3"><input name="search" type="text" class="input-block-level" value=""/></div>
            <div class="span1">Date from:</div>
            <div class="span2">
                <div id="datetimepicker2" class="input-append">
                    <input data-format="MM/dd/yyyy" type="text" name="dateFrom" placeholder="dateFrom" value="@((DateTime.Now.AddMonths(-1)).ToString("MM/dd/yyyy"))" style="width: 76%">
                    <span class="add-on">
                        <i data-time-icon="icon-time" data-date-icon="icon-calendar" class="icon-calendar"></i>
                    </span>
                </div>
            </div>
            <div class="span1">To:</div>
            <div class="span2">
                <div id="datetimepicker3" class="input-append">
                    <input data-format="MM/dd/yyyy" type="text" name="dateTo" placeholder="dateTo" value="@((DateTime.Now).ToString("MM/dd/yyyy"))"style="width: 76%">
                    <span class="add-on">
                        <i data-time-icon="icon-time" data-date-icon="icon-calendar" class="icon-calendar"></i>
                    </span>
                </div>
            </div>
            <div class="span2"><button type="submit" class="btn btn-primary">Search</button></div>
        </div>
        <div class="row-fluid">
            <div class="span2"><label><input type="checkbox" class="cbcheck" value=""/>Show RDM Order</label></div>
            <div class="" style="float: right">
                <button  type="submit" class="btn"><i class="icon-refresh"></i></button>
                <a class="btn" style="padding: 0 ;max-height: 30px" onclick="ExportCSV($('#table1'),'Orderhistory_@(Model.TradeAccountName).csv')">
                    <img src="/img/icon-exel.png" style="max-height: 30px">
                </a>
            </div>
        </div>
    </form>
    <div class="row-fluid" id="FilterResult" style="min-height: 50px">
        @Html.Partial("Partial/Trade/_TradeOrderHistoryList",new List<KRM.Core.sp_OrderHistory_Result>())
    </div>
</div>